﻿using Autofac;
using Laugh.DependencyInjection;

namespace Laugh
{
    public static class Resolver
    {
        private static IContainer GetContainer()
        {
            return Ioc.Container;
        }

        public static T GetService<T>()
        {
            return GetContainer().Resolve<T>();
        }

        public static T GetService<T>(string key)
        {
            return GetContainer().ResolveKeyed<T>(key);
        }
    }
}
